H-6763: Speak finalized Brunch responses with OpenAI - #9357
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
d4fe337 to
588eff3
Compare
cf09c5c to
7c04220
Compare
588eff3 to
b98ec47
Compare
7c04220 to
f27bfec
Compare
b98ec47 to
7250b21
Compare
7250b21 to
c8c9656
Compare
f27bfec to
20c3818
Compare
a6c1ca9 to
aab58fd
Compare
lunelson
left a comment
There was a problem hiding this comment.
This stays on the website and follows the ADR: pick finalized assistant text and a validated brunch_ask question from the AI SDK parts, send that text unchanged, keep the mic closed, and leave the visible text if speech fails. No Petrinaut API change.
One stack question. #9399 deletes /api/voice/speech, openai-speech.ts, and speech-playback-controller.ts. Canonical selection looks like it survives; the dedicated TTS proxy does not. If the stack merges as a unit, this increment never reaches main. Is it still worth keeping for review history, or can it come out so the Realtime-2 move does not have to unwind it?
Approving as-is.
747cf0c to
7abac78
Compare
aab58fd to
6dc4472
Compare
Merge activity
|
Select only finalized canonical assistant text and validated brunch_ask questions, then forward the exact fingerprinted text through the app-owned OpenAI Speech edge. Queue cancelable MP3 playback behind Brunch, keep the microphone closed until speech drains, reject stale generations, disclose the AI-generated voice, and preserve visible text on failure. Amp-Thread-ID: https://ampcode.com/threads/T-01a03fb3-fd3d-737f-b4c6-1fc9282950bf Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Keep ready chat updates from reopening the microphone or starting queued speech before the active transcript is finalized. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the early transcribing return authoritative so intermediate stack branches type-check without changing runtime behavior. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Move the voice status off playback while Brunch is still completing the active turn, without reopening the microphone early. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7db6532. Configure here.
Use the existing chat update helper after the controller API consolidation so the pending-transcript regression test exercises the current interface. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep recoverable speech failures latched across pending delivery races, and limit the upstream timeout to waiting for OpenAI's response so valid audio streams can finish. Co-authored-by: Cursor <cursoragent@cursor.com>


🌟 What is the purpose of this PR?
Speak finalized Brunch responses through OpenAI's dedicated Speech API. The exact canonical text already visible in Petrinaut—including a validated pending
brunch_askquestion—is selected once, sent unchanged for synthesis, and played while the microphone remains closed.OpenAI Realtime continues to perform transcription only; it never generates assistant responses.
🔗 Related links
🚫 Blocked by
🔍 What does this change?
brunch_ask.input.questionvalues.{ segmentId, text }./api/voice/speechedge.gpt-4o-mini-ttswith server-fixedmarinvoice and MP3 output.audio/mpeg, disables caching, sanitizes upstream errors, and propagates timeouts/client cancellation.response.createevent.Stack record: direct base
7c042206e919b80ef27ce46649bfe5202005b27c; PR headb98ec4772a9702e1cba096e5604e7dc77f46706d.Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
No existing documentation screenshot covers this voice surface.
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
@apps/brunch-agentCI jobs cannot see the non-workspace condition-5 runner on the FE-1506: Show captures and completion while a panel elicitation runs #9346 base. Parallel PR #9348 already contains the exact tested prune fix (ade09e9c36), so this sibling stack does not duplicate it. Full-checkout Brunch tests, lint, typecheck, and build pass locally.no-await-in-loopwarnings and Brunch emits 12 inherited warnings.🐾 Next steps
Voice PR4 will add delivery caching, authoritative reload reconciliation, stale-ask recovery, authentication, distributed quotas, telemetry, retention cleanup, a kill switch, and real completion/projection evidence. It must not start until the listed platform contracts are available.
🛡 What tests cover this?
Validation run
Results: 214 Petrinaut tests, 72 website tests, 12 transport tests, and 35 Brunch tests passed locally. Lint, typecheck, build, formatting, and architecture-doc checks passed.
The direct-base no-ElevenLabs audit and
git diff --checkpassed. No package manifest or lockfile changed; provider-owned paths are explicitly OpenAI-named.Credential-dependent checks not run: real OpenAI synthesis, remote Brunch, microphone/browser permission, exact spoken output in desktop Chrome/Edge/Safari, and deployed cancellation/failure behavior.
❓ How to test this?
yarn workspace @apps/petrinaut-website test:unitplus its lint, typecheck, and build commands above.📹 Demo
Not included: credentialed browser/provider evidence remains an explicit acceptance requirement.